package com.iceland.common.handler;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;


public class AsyncHandler extends ChannelInboundHandlerAdapter {
    //连接
    @Override
    public void channelRegistered(ChannelHandlerContext ctx) throws Exception {
    }

    /**
     * 没有解码器解包的情况下，单次最多读取到2048字节数据
     * @param ctx
     * @param msg
     * @throws Exception
     */
    @Override
    public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
    }

//    @Override
//    public void channelReadComplete(ChannelHandlerContext ctx) throws Exception {
//        log.info("channelReadComplete执行");
//    }

    //断开
    @Override
    public void channelInactive(ChannelHandlerContext ctx) throws Exception {
        ctx.fireChannelInactive();
    }

}
